import time
a=open('/home/student/Рабочий стол/Бельфиоре София/m1_sorted.txt')
d=a.readlines
d=list(map(int,a))
st=time.time()
for i in range (len(d)-1):
    for j in range (i+1, len(d)):
        if d[i]>d[j]:
            d[i], d[j]=d[j], d[i]
fin=time.time()
print(round(fin-st)*1000)


r=open('/home/student/Рабочий стол/Бельфиоре София/m2_reverse.txt')
t=r.readlines
t=list(map(int,a))
st=time.time()
for i in range (len(t)-1):
    for j in range (i+1, len(t)):
        if t[i]>t[j]:
            t[i], t[j]=t[j], t[i]
fin=time.time()
print(round(fin-st)*1000)

w=open('/home/student/Рабочий стол/Бельфиоре София/m3_shuffle.txt')
q=w.readlines
q=list(map(int,a))
st=time.time()
for i in range (len(q)-1):
    for j in range (i+1, len(q)):
        if q[i]>q[j]:
            q[i], q[j]=q[j], q[i]
fin=time.time()
print(round(fin-st)*1000)

